package com.nbst.controller.base;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.nbst.comnutil.NormalResult;
import com.nbst.comnutil.Tools;
import com.nbst.model.base.BaseConfig;
import com.nbst.service.base.IBaseConfigService;

/**
 * @ClassName: BaseConfigConfigController
 * @Description:基础配置类
 * @author King
 * @date 2019年9月6日
 * 
 */
@RestController
@RequestMapping("/config")
public class BaseConfigConfigController {
	@Autowired
	IBaseConfigService baseConfigService;

	@GetMapping("/findByCondition.action")
	public NormalResult findByCondition(BaseConfig record,
			@RequestParam(required = false, defaultValue = "1") Integer offset,
			@RequestParam(required = false, defaultValue = "10") Integer row) {
		Map<String,Object> map = Tools.transBean2Map(record);
		return baseConfigService.findByCondition(map, offset, row);
	}

}
